{extends file="./main.tpl"}
{block name=head}
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
{/block}
{block name="body"}
<form name="party" action="{$smarty.server.PHP_SELF}" method="post" enctype="multipart/form-data">
<table align="center" border="1" cellpadding="2" cellspacing="2" >
  <tr>
    <td align="center" class="table1" colspan="7">Item Image</td>
  </tr>
  <tr>
    <th class="table2">Sr No</th>
    <th class="table2">Item</th>
    <th class="table2">Size</th>
    <th class="table2">Company</th>
    <th class="table2">Quality</th>
    <th class="table2">Color</th>
    <th class="table2">Image</th>
  </tr>
  <tbody id="mainDiv">
<!--===========Item Select box ===============-->	
  <tr id="one" class="one">
    <td><input type="text" name="srno[]" id="srno[]" class="srno" size="3" value="1" disabled />
    </td>
      <td align="center" class="table2">
	      <select name="itemId[]" id="item"  onchange="itemAjax(this);" autofocus="autofocus">
	        <option value="0">Select Item</option>
	        {html_options values=$itemArray.itemId output=$itemArray.itemName}
        </select>
      </td>
<!--===========Size Select box ===============-->
      <td align="center" class="table2">
        <select name="sizeId[]" id="size" class="sizeSelect" onchange="sizeAjax(this);">
      	  <option value="0">Select Size</option>
        </select>
      </td>
<!--===========Company Select box ===============-->
      <td align="center" class="table2">
	      <select name="companyId[]" id="company" class="add companySelect" onchange="companyAjax(this);">
	        <option value="0">Select Company</option>
        </select> 
      </td>
<!--===========Quality Select box ===============-->
      <td align="center" class="table2">
	      <select name="qualityId[]" id="quality" class="qualitySelect" onchange="qualityAjax(this);">
	        <option value="0">Select Quality</option>
        </select>
      </td>
<!--===========Color Select box ===============-->
      <td align="center" class="table2">
	      <select name="colorId[]" id="color" class="colorSelect">
	        <option value="0">Select Color</option>
        </select>
      </td>
       <th class="table2">Image : <input name="userfile[]" type="file" id="userfile"></th>
    </tr>
  </tbody>
  <tr>
    <td class="table1" align="center" colspan="9" ><input type="submit" name="submitBtn" value="Submit" class="button" /></td>
  </tr>
</table>
</form>
<table align="center" border="2" cellpadding="2" cellspacing="2" width="" >
<tr>
  <td align="center" class="table1" colspan="13"><b> Image Master</b></td>
</tr>
<tr>
  <td class="table2" NOWRAP><b></b></td>
  <td class="table2" NOWRAP><b>Item</b></td>
  <td class="table2" NOWRAP><b>Size </b></td>
	<td class="table2" NOWRAP><b>Company </b></td>
  <td class="table2" NOWRAP><b>Quality </b></td>
  <td class="table2" NOWRAP><b>Color  </b></td>
  <th class="table2" align="center">Image</th>
</tr>
 {section name="sec" loop=$colorArray}
<tr>
  <td class="table2" align="center"><a href="colorDelete.php?colorId={$colorArray[sec].colorId}" onclick="return myFunction();"class="link"> <img src="./images/deleteIco.png"></a></td>
  <td class="table2"NOWRAP>{$colorArray[sec].itemId}</td>
  <td class="table2"NOWRAP>{$colorArray[sec].sizeId}</td>
  <td class="table2"NOWRAP>{$colorArray[sec].companyId}</td>
  <td class="table2"NOWRAP>{$colorArray[sec].qualityId}</td>
  <td class="table2"NOWRAP>{$colorArray[sec].colorName}</td>
  <td class="table2" ><img src="images/img/{$colorArray[sec].itemImage}" height="50" width="50" ></td>
</tr>
{/section}
</table>
{/block}